#!/bin/bash
#-- - - - - - -Script comment information - - - - - - - - - -
#Author：                               拉基
#Email：                        helpdesk81@outlook.com
#Creation time：                2021-02-05
#FileName：                     for_5.sh
#Blog address：                 https://www.cnblogs.com/98record/
#Copyright (C)                  2021All rights reserved
#- - - - - - - - - - - - - end - - - - - - - - - - - - - - - - - -
#计算1到100的和
sum=0
for i in {1..100};do
	let sum+=i
done
echo "sum=$sum"

for ((sum=0,i=0;i<=100;i++));do
	let sum+=i
done
echo "sum2=$sum"
